package com.tangzhe.annotation;

import java.lang.reflect.Method;

/**
 * 测试注解
 */
public class TestAnnotation {

    public static void main(String[] args) throws ClassNotFoundException, NoSuchMethodException {
        //Class clazz = Class.forName("com.tangzhe.entity.Demo");
        Class clazz = Demo.class;
        Method method = clazz.getDeclaredMethod("sum", int.class, int.class);
        Test test = method.getAnnotation(Test.class);
        System.out.println(test.name());
        System.out.println(test.value());
    }

}
